<?php
class Form_Model_Mail extends Zend_Mail
{
    public function send($config, $data)
    {
        $bodyData = $config->page->data . '\n\n';

        foreach ($data as $key => $value) {

            $bodyData .= $key . ' ' . $value . '\n';
        }
        
        return $this->setBodyText($config->mail->text . $bodyData)
                    ->setFrom($config->from->adress, $config->mail->from->name)
                    ->addTo($config->mail->to->adress, $config->mail->to->name)
                    ->setSubject($config->mail->subject)
                    ->send();
    }
}